<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%-- Declare the core library --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>order items</title>
</head>
<body>
	<h3>Enter your personal information and confirm buy</h3>
	<table>
		<tr>
			<td style="width: 80%"></td>
			<td><c:out value="login=${sessionScope.USER_SESSION_KEY.login}" />
				<br /> <c:out value="name=${sessionScope.USER_SESSION_KEY.name}" />
				<br /> <c:out value="money on account=${sessionScope.USER_SESSION_KEY.money}" />
			</td>
		</tr>
	</table>

	<table border="1px">
		<tr>
			<td>name</td>
			<td>price</td>
			<td>quantity</td>
		</tr>
		<c:forEach items="${sessionScope.BASKET_BEAN_SESSION_BEAN.itemList}"
			var="itemBean">
			<tr>
				<td><c:out value="${itemBean.item.name}" /></td>
				<td><c:out value="${itemBean.item.price}" /></td>
				<td><c:out value="${itemBean.quantity}" /></td>
			</tr>
		</c:forEach>
	</table>
	<c:out
		value="Total price = ${sessionScope.BASKET_BEAN_SESSION_BEAN.totalCost}" />
		
   <form action="./?cmd=Buy" method="post">
    Delivery address:
    <input type="text" name="addressDelivery" value="${sessionScope.BASKET_BEAN_SESSION_BEAN.order.address}"/>
    <c:if test="${not empty requestScope.errorMap['addressDelivery']}">
		<span style="color: #FF0000">
	    	<c:out value="${requestScope.errorMap['addressDelivery']}" />
	    </span>
    </c:if>
   	
   	<br/>
   	Special notes:
   	<textarea name="notes"><c:out value="${sessionScope.BASKET_BEAN_SESSION_BEAN.order.notes}"/></textarea>
   	<br/>
   	<input type="submit"/>
   </form>
</body>
</html>